﻿SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';

DROP SCHEMA IF EXISTS `testdb` ;
CREATE SCHEMA IF NOT EXISTS `testdb` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
USE `testdb` ;

CREATE  TABLE IF NOT EXISTS `bank` (
  `idbank` INT NOT NULL AUTO_INCREMENT ,
  `name` VARCHAR(45) NOT NULL ,
  `enabled` TINYINT(1) NULL ,
  PRIMARY KEY (`idbank`) )
ENGINE = InnoDB;

CREATE  TABLE IF NOT EXISTS `users` (
  `iduser` INT NOT NULL AUTO_INCREMENT ,
  `name` VARCHAR(45) NOT NULL ,
  PRIMARY KEY (`iduser`) )
ENGINE = InnoDB;

START TRANSACTION;
USE `testdb`;
INSERT INTO `testdb`.`bank` (`idbank`, `name`, `enabled`) VALUES (1, 'Ninguno', 1);
INSERT INTO `testdb`.`bank` (`idbank`, `name`, `enabled`) VALUES (2, 'Frances', 1);
INSERT INTO `testdb`.`bank` (`idbank`, `name`, `enabled`) VALUES (3, 'Nacion', 1);
INSERT INTO `testdb`.`bank` (`idbank`, `name`, `enabled`) VALUES (4, 'Itau', 1);
INSERT INTO `testdb`.`bank` (`idbank`, `name`, `enabled`) VALUES (5, 'Galicia', 1);

COMMIT;

START TRANSACTION;
USE `testdb`;
INSERT INTO `testdb`.`users` (`iduser`, `name`) VALUES (1, 'Juan');
INSERT INTO `testdb`.`users` (`iduser`, `name`) VALUES (2, 'Jose');
INSERT INTO `testdb`.`users` (`iduser`, `name`) VALUES (3, 'Fito');
INSERT INTO `testdb`.`users` (`iduser`, `name`) VALUES (4, 'Emilio');
INSERT INTO `testdb`.`users` (`iduser`, `name`) VALUES (5, 'Fabio');

COMMIT;